public class ThreadTest {
    public static void test() {

        double local = 100.0;

        for (int i = 0; i < 10; i++) {

            double local1 = local + i;

            System.out.println(System.identityHashCode(local) + " " + local + " " + Thread.currentThread().getName());
            System.out.println(System.identityHashCode(local1) + " " + local1 + " " + Thread.currentThread().getName());

            new Thread(new Runnable() {

                @Override
                public void run() {

                    System.out.println(System.identityHashCode(local) + " " + local + " " + Thread.currentThread().getName());
                    System.out.println(System.identityHashCode(local1) + " " + local1 + " " + Thread.currentThread().getName());
                }
            }).start();
        }
    }

    public static void main(String[] args) {
        test();
    }
}
